---
import Layout from "../layouts/Layout.astro";
import PageHeading from "../components/page-heading.astro";
import IconMdiCalendarMonthOutline from "~icons/mdi/calendar-month-outline";
import IconMdiCommentOutline from "~icons/mdi/comment-outline";
---

<Layout>
  <PageHeading>
    <th:block slot="title" th:text="${singlePage.spec.title}"> </th:block>
    <div class="post-info mt-2">
      <div class="meta">
        <div class="info">
          <IconMdiCalendarMonthOutline class="w-3 h-3" />
          <span
            th:text="${#dates.format(singlePage.spec.publishTime,'yyyy-MM-dd')}"
          ></span>
          <IconMdiCommentOutline class="w-3 h-3" />
          <a
            th:href="@{${singlePage.status.permalink}}"
            th:text="${singlePage.stats.comment}"
          >
          </a>
        </div>
      </div>
    </div>
  </PageHeading>
  <div class="post-page">
    <div class="post animated fadeInDown">
      <div
        th:utext="${singlePage.content.content}"
        id="post-content"
        class="post-content markdown-body"
      >
      </div>
    </div>
    <div id="comment_widget" style="margin: 30px;">
      <halo:comment
        group="content.halo.run"
        kind="singlePage"
        th:attr="name=${singlePage.metadata.name}"
      >
      </halo:comment>
    </div>
  </div>
</Layout>
